<template>
  <view class="index-page">
    <u-navbar
      :title="state.obj.name"
      :background="{ background: '#111723' }"
      back-icon-color="#fff"
      title-color="#fff"
      :title-bold="true"
      :border-bottom="false"
    ></u-navbar>
    <scroll-view
      :style="{ height: '1535rpx' }"
      :scroll-y="true"
      lower-threshold="30"
    >
      <view class="scrool">
        <rich-text :nodes="state.obj.content"></rich-text
      ></view>
    </scroll-view>
  </view>
</template>
<script setup lang="ts">
import { getArticleDetail } from '@/api/modules/user'
import { onLoad } from '@dcloudio/uni-app'
import { reactive, onMounted } from 'vue'
const state = reactive({
  id: '',
  obj: {} as any
})
onLoad((options) => {
  state.id = options.id as string
})
onMounted(() => {
  getArticleDetail({ article_id: state.id }).then((result) => {
    state.obj = result.data
  })
})
</script>
<style lang="less" scoped>
.index-page {
  height: 100%;
  .scrool {
    padding: 50rpx;
    color: #fff;
  }
}
</style>
